bitkeeper revision 1.1159.258.103 (42642c5djs1dzMOSs-vIJLlGCQyrMQ)
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Mon, 18 Apr 2005 21:53:33 +0000 (21:53 +0000)
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Mon, 18 Apr 2005 21:53:33 +0000 (21:53 +0000)
Allow xc_domain_info_t to be optional in xc_domain_getfullinfo
From: Kip Macy
Signed-off-by: ian@xensource.com
tools/libxc/xc_domain.c

index 67168910e9f379245b789078bd6a172e9776b1e0..b2c468bc907be792e8143550c17f0b7eeb163c12 100644 (file)
@@ -132,7 +132,8 @@ int xc_domain_getfullinfo(int xc_handle,
 
     rc = do_dom0_op(xc_handle, &op);
 
-    memcpy(info, &op.u.getdomaininfo, sizeof(*info));
+    if ( info )
+        memcpy(info, &op.u.getdomaininfo, sizeof(*info));
 
     if ( ((u16)op.u.getdomaininfo.domain != domid) && rc > 0 )
         return -ESRCH;